﻿using System.Data;
using System.Windows.Forms;

namespace SdmxMl.Common
{
    #region Repository Checkout State Enum

    public enum CheckInOutState
    {
        None,
        CheckOut,
        CheckIn
    }
    #endregion

    #region ICheckInOutState

    public interface ICheckInOutState
    {
        CheckInOutState RegCheckState
        {
            get;
            set;
        }
    }
    #endregion

    #region IReportedValue

    public interface IReportedValue
    {
        MultiLang InternationalizedValue
        {
            get;
        }

        string SimpleValue
        {
            get;
            set;
        }
    }
    #endregion

    #region ISearchIdName

    public interface ISearchIdName
    {
        MultiLang Name
        {
            get;
        }

        string Id
        {
            get;
            set;
        }
    }
    #endregion

    #region ISdmxNewChild

    public interface ISdmxNewChild
    {
        TreeNode NewChild(TreeNode node);
    }
    #endregion

    #region ISdmxDelChild

    public interface ISdmxDelChild
    {
        void DelChild(object o);
    }
    #endregion

    #region ISdmxHierarchyListItem

    public interface ISdmxHierarchyListItem
    {
        TreeNode FillNode(TreeNode parentNode);

        ISdmxHierarchyListItem Clone();

        AnnotationList AnnotationList
        {
            get; 
        }

        string Parent
        {
            get;
            set;
        }

        string Id
        {
            get;
            set;
        }

        MultiLang Name
        {
            get;
        }

        IHierarchyManage InnerHierarchy
        { get; }

    }
    #endregion

    #region iMapReferences

    public interface iMapReferences
    {
        ArtefactRefBase SourceRef
        { get; }

        ArtefactRefBase TargetRef
        { get; }

        SdmxMl.Manager.SdmxArtefactType ArtType
        { get; }

        DataTable GetMapTable();
    }

    #endregion

    #region ISdmxArtefactRef

    /// <summary>
    /// Interface for any Artefact Keys manipulation
    /// </summary>
    public interface ISdmxArtefactRef
    {
        string AgencyId
        {
            get;
            set;
        }

        string Id
        {
            get;
            set;
        }

        string Version
        {
            get;
            set;
        }
        string FullIdent
        {
            get;
        }
    }

    #endregion

    #region IHierarchyManage

    public interface IHierarchyManage
    {
        bool RemoveHierarchicalItem(ISdmxHierarchyListItem it);
        TreeNode NewChild(TreeNode node);
        DataTable PossibleParentsDataTable(ISdmxHierarchyListItem item);
        TreeNode FillTree(TreeNode parentNode);
        void RedefineParent(ISdmxHierarchyListItem item, string newParentId, object newOwner);
        DataTable GetTableRepresentation();
        bool RenameHierarchicalItem(ISdmxHierarchyListItem it, string newName);
        ISdmxHierarchyListItem GetParent(ISdmxHierarchyListItem it);

        bool HasHierarchy
        {
            get;
            set;
        }
    }

    #endregion

    #region IDatatableExchange

    public interface IDatatableExchange
    {
        DataTable AsDataTable();
        void FromDataTable(DataTable tb);
    }
    #endregion

}
